package org.crc.myvhrb.utils;

import org.crc.myvhrb.model.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * CRC
 * 2021/8/12
 */
public class HrUtils {
    /**
     * 获取 Hr 登录信息
     * @return
     */
    public static Hr getCurrentHr(){
        return ((Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }

}
